<?php
// +----------------------------------------------------------------------
// | quanli team
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2020 http://www.fistforward.com/ All rights reserved.
// +----------------------------------------------------------------------
// | create by allen.qiang
// +----------------------------------------------------------------------


/**
 * 领奖纪录操作功能
 * @package  htdocs
 * @subpackage  quanliadmin
 * @create by allen.qiang
 */

class pa_signedTo {

    public function execute() {

        if (isset($_REQUEST['operFlg']) && is_numeric($_REQUEST['operFlg']) && $_REQUEST['operFlg'] > 0) {

            switch ($_REQUEST['operFlg']){
                case 1: //签到列表
                    $this->signedToList();
                    break;

                case 2: //签到添加
                    $this->signedToEdit();
                    break;

                default:
                    $this->toError('参数错误');
                    break;
            }

        } else {

            $this->toError('参数错误');

        }

    }

    /**
     * 转跳到错误页面
     * @param string $msg 错误信息
     */
    private function toError( $msg = '' ) {

        global $G_PGLOB;

        $G_PGLOB->display_error_page( $msg );

    }

    /**
     * 签到列表
     */
    private function signedToList() {

        global $G_PGLOB;

        $edit_permission = $G_PGLOB->has_permission(4527);

        $G_PGLOB->smarty->assign('edit_permission',$edit_permission);

        $G_PGLOB->smarty->display('promotion/signedToList.tpl');

    }

    //签到编辑
    private function signedToEdit(){

        global $G_PGLOB;

        $G_PGLOB->smarty->display('promotion/signedToEdit.tpl');


    }

}